import request from '@/utils/request'

// 查询积分管理列表
export function listPointsManagement(query) {
    return request({
        url: '/jy/pointsManagement/list',
        method: 'get',
        params: query
    })
}

// 查询积分管理详细
export function getPointsManagement(id) {
    return request({
        url: '/jy/pointsManagement/' + id,
        method: 'get'
    })
}

// 新增积分管理
export function addPointsManagement(data) {
    return request({
        url: '/jy/pointsManagement',
        method: 'post',
        data: data
    })
}

// 修改积分管理
export function updatePointsManagement(data) {
    return request({
        url: '/jy/pointsManagement',
        method: 'put',
        data: data
    })
}

export function increasePoints(data) {
    return request({
        url: '/jy/pointsManagement/increasePoints',
        method: 'put',
        data: data
    });
}

export function decreasePoints(data) {
    return request({
        url: '/jy/pointsManagement/decreasePoints',
        method: 'put',
        data: data
    });
}

// 删除积分管理
export function delPointsManagement(id) {
    return request({
        url: '/jy/pointsManagement/' + id,
        method: 'delete'
    })
}